:root {
  /* 浅色主题变量 */
  --bg-color-light: #ffffff;
  --text-color-light: #333333;
  --border-color-light: #e5e5e5;

  /* 深色主题变量 */
  --bg-color-dark: #141414;
  --text-color-dark: #ffffff;
  --border-color-dark: #303030;
}

/* 浅色主题 */
.light-theme {
  background-color: var(--bg-color-light);
  color: var(--text-color-light);
}

/* 深色主题 */
.dark-theme {
  background-color: var(--bg-color-dark);
  color: var(--text-color-dark);
}

.theme-toggle-btn {
  padding: 4px 8px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.dark-theme .ant-layout-header {
  background-color: #141414 !important;
}

.dark-theme .ant-layout-footer {
  background-color: #141414 !important;
}

.header-wrapper {
  padding: 0;
  height: 64px;
  line-height: 64px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dark-theme .header-wrapper {
  background: #141414;
  border-bottom: 1px solid #303030;
}

.light-theme .header-wrapper {
  background: #fff;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: inherit;
  text-decoration: none;
}

.menu-custom {
  background: transparent !important;
  border-bottom: none !important;
}

.dark-theme .ant-menu {
  background: transparent !important;
  color: #fff;
}

.dark-theme .ant-menu-item-selected {
  background-color: #1f1f1f !important;
}

.dark-theme .ant-menu-item:hover {
  background-color: #1f1f1f !important;
}

.archive-page {
  padding: 24px;
}

.archive-card {
  max-width: 900px;
  margin: 0 auto;
}

.dark-theme .archive-card {
  background: #1f1f1f;
  border-color: #303030;
}

.post-item {
  position: relative;
  padding: 16px;
  border-radius: 8px;
  transition: all 0.3s;
}

.post-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.dark-theme .post-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.year-group {
  position: relative;
  padding-left: 20px;
  margin-bottom: 40px;
}

.year-group::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e8e8e8;
}

.dark-theme .year-group::before {
  background-color: #303030;
}

.dark-theme .ant-timeline-item-tail {
  border-left-color: #303030;
}

.dark-theme .ant-timeline-item-head {
  background-color: #141414;
}

.dark-theme .ant-card-head {
  border-bottom-color: #303030;
}

.dark-theme .ant-tag {
  background: #141414;
  border-color: #303030;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 30px;
  border-radius: 15px;
  background-color: #ccc;
  cursor: pointer;
  position: relative;
  transition: background-color 0.3s;
  border: 1px solid #999;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-container.light {
  background-color: #f0e68c; /* 浅色背景 */
}

.toggle-container.dark {
  background-color: #333; /* 深色背景 */
}

.toggle-icon {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: white;
  transition: transform 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  top: 1px; /* 调整图标的垂直位置 */
}

.toggle-container.light .toggle-icon {
  transform: translateX(-14px);
}

.toggle-container.dark .toggle-icon {
  transform: translateX(14px); /* 移动到右侧 */
} 